package design.simdi.code.final_paper.site.panels;

import org.apache.wicket.Page;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.extensions.wizard.Wizard;

import design.simdi.code.final_paper.core.services.ServiceException;
import design.simdi.code.final_paper.site.pages.BasePage;

/**
 * 
 * @author Marius Dumitriu - (Jun 4, 2010 - 12:00:24 PM)
 * 
 */
public class MyWizard extends Wizard {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public MyWizard(String id, boolean addDefaultCssStyle) {
		super(id, addDefaultCssStyle);

	}

	public void onCancel(AjaxRequestTarget target) {
		Page page = this.getPage();
		target.addComponent(page.get("content"));
		target.addComponent(page.get(BasePage.ERRORS_PANEL));
		warn(page.getString("operation.canceled"));
	}

	public void onFinishMessage(AjaxRequestTarget target) {
		Page page = this.getPage();
		target.addComponent(page.get("content"));
		target.addComponent(page.get(BasePage.ERRORS_PANEL));
		info(page.getString("operation.success"));

	}

	public void onFinish(AjaxRequestTarget target) throws ServiceException {

	}

}
